﻿
// MFTimerDlg.h: 头文件
//

#pragma once
#include "HalconCpp.h"

#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)

using namespace HalconCpp;

// CMFTimerDlg 对话框
class CMFTimerDlg : public CDialogEx
{
// 构造
public:
	CMFTimerDlg(CWnd* pParent = nullptr);	// 标准构造函数

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_MFTIMER_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;

	
	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	HObject ho_Imageres, ho_Image, ho_GrayImage, ho_ImageZoomed, ho_EdgeAmplitudeTenengrad; ;             //采集的图片
	HTuple  hv_AcqHandle, hWndID;  //窗口句柄
	HTuple  hW, hH;                //图片的宽高
	HTuple  hv_ValueTenengrad, hv_DeviationTenengrad;

	afx_msg void OnTimer(UINT_PTR nIDEvent);
	CStatic m_ctlShowWnd;
	afx_msg void OnBnClickedCap();
	afx_msg void OnBnClickedCancel();
	afx_msg void OnBnClickedButton1();
	afx_msg HTuple HTenegrad(HObject& ho_Image);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
};
